/**
 * @project heima-leadnews
 * @author MECHREVO
 * @date 2024/1/11 15:10:34
 * @version 1.0
 */
package com.heima.user.controller;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dto.LoginDto;
import com.heima.user.service.ApUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Slf4j
@RequestMapping("/api/v1/login")
@Api(tags = "app登录模块")
public class ApUserController {

    @Autowired
    private ApUserService apUserService;

    /**
     * app端登录
     *
     * @param loginDto
     * @return
     */
    @ApiOperation(value = "app登录接口")
    @PostMapping("/login_auth")
    public ResponseResult loginAuth(@RequestBody LoginDto loginDto){
        return apUserService.loginAuth(loginDto);
    }
}
